﻿Public Class Registrar_pedido
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub BT_atras_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_atras.Click
        Response.Redirect("~/Registrar.aspx")
    End Sub

    Protected Sub BT_registrar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_registrar.Click
        Dim datacontex As New DCStorexpressDataContext
        Dim mensaje As MsgBoxResult
        mensaje = MsgBox("¿Desea Guardar Registro?", MsgBoxStyle.OkCancel, "REGISTRO")
        If mensaje = MsgBoxResult.Ok Then
            MsgBox("Registro Guardado")
            datacontex.INSERTAR_PEDIDO(Me.TB_pedido.Text, Me.TB_codigo.Text, Me.TB_nit.Text, Me.TB_fecha.Text, Me.TB_cantidad.Text, (Val(Me.TB_precio.Text)))
            TB_pedido.Text = ""
            TB_codigo.Text = ""
            TB_nit.Text = ""
            TB_fecha.Text = ""
            TB_cantidad.Text = ""
            TB_precio.Text = ""
        End If


    End Sub
End Class